c="Test du schéma"||'0a'x||"1- Vérifier les références "||'0a'x||"2- Vérifier les valeurs "||'0a'x||"3- Vérifier les connexions "||'0a'x||"4- Vérifier les liaisons "||'0a'x||"5- Tester présence doublons"||'0a'x
c=c||"6- Enchaîner tous les tests"||'0a'x||"7- Abandonner "
if fr=1 then 'LOCK:TITLE("Vérification des références...")'
else 'LOCK:TITLE("Verifying references...")'
do i=1 to objets
'TYPE(O='i')'
if result=1 then do
'PARTNAME(O)'
if result~="ALIMENTATION" & result ~="MASSE" then do
'GETREF(O)'
if result=0 then do
if fr=1 then 'MARK(O):REQUEST("Attention l''objet 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"situé en "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"n''a pas de référence"+CHR(10)+"Voulez-vous continuer?")'
else 'MARK(O):REQUEST("Warning: object 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"located at "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"has no reference"+CHR(10)+"Do-you want to continue?")'
if result<1 then do
'UNLOCK'
return
end
'UNMARKCOMP(O)'
errrefs=errrefs+1
end
end
end
end
'UNLOCK'
return
test_valeurs:
if fr=1 then 'LOCK:TITLE("Vérification des valeurs..."):UNMARK(-1)'
if result~="ALIMENTATION" & result ~="MASSE" then do
'GETVAL(O)'
if result=0 then do
if fr=1 then 'MARK(O):REQUEST("Attention l''objet 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"situé en "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"n''a pas de valeur"+CHR(10)+"Voulez-vous continuer?")'
else 'MARK(O):REQUEST("Warning: object 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"located at "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"has no value"+CHR(10)+"Do-you want to continue?")'
if result<1 then do
'UNLOCK'
return
end
'UNMARKCOMP(O)'
errvals=errvals+1
end
end
end
end
'UNLOCK'
return
test_doublets:
if fr=1 then 'LOCK:TITLE("Vérification absence éléments doubles..."):UNMARK(-1)'
else 'LOCK:TITLE("Checking for duplicates objects..."):UNMARK(-1)'
if fr=1 then 'MARK(O,D):MESSAGE("Attention: la référence"+CHR(10)+READTEXT(GETREF(O))+CHR(10)+"est utilisée deux fois!")'
else 'MARK(O,D):MESSAGE("Warning: reference"+CHR(10)+READTEXT(GETREF(O))+CHR(10)+"is used twice !")'
end
end
if i>=objets-1 then i=0
else i=i+1
end
end
'UNLOCK'
return
test_connexions:
if fr=1 then 'LOCK:TITLE("Vérification des liaisons aux composants..."):UNMARK(-1)'
else 'LOCK:TITLE("Verifying nets..."):UNMARK(-1)'
i=1
do while i>0
'O=FINDOBJ('i',1,-1,-1)'; i=result
if i>0 then do
'PARTNAME(O)'
'DEVPINS(O)'; j=result
do k=1 to j
if connexion_broche(i,k)=0 then do
if fr=1 then do
'MARK(O):REQUEST("Attention l''objet 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"situé en "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"a sa borne "+STR(IF(PINNUM(O,'k'),PINNUM(O,'k'),'k'))+" non connectée"+CHR(10)+"Voulez-vous continuer?")'
end
else do
'MARK(O):REQUEST("Warning: object 'i'"+CHR(10)+"("+PARTNAME(O)+")"+CHR(10)+"located at "+STR(COL(O))+" "+STR(LINE(O))+CHR(10)+"has pin "+STR(IF(PINNUM(O,'k'),PINNUM(O,'k'),'k'))+" not connected"+CHR(10)+"Do-you want to continue ?")'
end
if result<1 then do
'UNLOCK'
return
end
'UNMARKCOMP(O)'
errconx=errconx+1
end
end
if i=objets then leave
i=i+1
end
end
'UNLOCK'
return
test_liaisons:
if fr=1 then 'LOCK:TITLE("Recherche et élimination lignes inutiles...")'